<?php ?>
<html>
    <head>
        <script src="jquery-1.9.1.min.js"></script>

        <!--LIBRERIAS JQUERY PARA LA CREACION DE LAS ALERTAS -->
        <script type="text/javascript" src="../../../Ginecobstetricia/vista/js/alertify.js"></script>
        <link rel="stylesheet" href="../../../Ginecobstetricia/vista/css/alertify.core.css" />
        <link rel="stylesheet" href="../../../Ginecobstetricia/vista/css/alertify.default.css"/>


        <style>
            label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:28px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:250px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:250px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}
            #tabla{
                font-size: 90%;padding: 20px 20px 20px;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:45%;height:auto;-moz-border-radius:8px; /* FF1+ */-webkit-border-radius:8px; /* Saf3-4 */border-radius:8px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);

            }
            #tabla2{
                font-size: 95%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;height: 58%;margin:auto auto 0;-moz-border-radius:8px; /* FF1+ */-webkit-border-radius:8px; /* Saf3-4 */border-radius:8px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);

            }
            #titulo1{
                height: 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;
            }
            #titulo{
                padding: 0.5%;height: 1px;width: 250px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;  
            }
            #filas{
                padding:10px 10px 10px; border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));font-size:90%

            }
            
            #apDiv1 {
                position: absolute;
                left: 125px;
                top: 53px;
                width: 1003px;
                height: 100px;
                z-index: 1;
            }

            #apDiv3 {
                position: absolute;
                left: 803px;
                top: 212px;
                width: 106px;
                height: 18px;
                z-index: 2;
            }
            #apDiv4 {
                position: absolute;
                top: 11px;
                width: 2750px;
                height: 6390px;
                z-index: 1;
            }
            #apDiv5 {
                position: absolute;
                left: 13px;
                top: 673px;
                width: 1321px;
                height: 125px;
                z-index: 2;
            }
            #apDiv2 {
                position: absolute;
                left: 558px;
                top: 679px;
                width: 424px;
                height: 246px;
                z-index: 2;
            }
        </style>
        <script>
            
            /*llama los datos asociados al codigo de solicitud de examen*/
            function datosla() {
                var n = document.getElementById("N").value;
                var oid = document.getElementById("OID").value;
                $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../controlador/php/sql/datosSI.php",
                    data: {oid:oid,n:n},
                    success: mensaje,
                    timeout: 4000
                });
            }
            
            /*pinta en los divs la informacion asociada a la solicitud de examen */
            function mensaje(datos) {
                rpt = $.parseJSON(datos);
                for (dat in rpt) {
                    document.getElementById("ingreso").innerHTML = rpt[dat].INGRESO;
                    document.getElementById("cama").innerHTML = rpt[dat].CAMA;
                    document.getElementById("cantidad").innerHTML = rpt[dat].CANTIDAD;
                    document.getElementById("medico").innerHTML = rpt[dat].MEDICO;
                    document.getElementById("observaciones").innerHTML = rpt[dat].OBSERVACIONES;
                    document.getElementById("estado").innerHTML = rpt[dat].ESTADO;
                    document.getElementById("fecha_soli").innerHTML = rpt[dat].FECHA_SOLICITUD;
                    document.getElementById("fecha_nac").innerHTML = rpt[dat].GPAFECNAC;
                    document.getElementById("edad").innerHTML = rpt[dat].EDAD;
                    document.getElementById("folio").innerHTML = rpt[dat].NUM_FOLIO;
                    document.getElementById("clase_ingreso").innerHTML = rpt[dat].CLASE_INGRESO;
                    document.getElementById("codigo").innerHTML = rpt[dat].CODIGO;
                    document.getElementById("ingreso_por").innerHTML = rpt[dat].INGRESO_POR;
                    document.getElementById("muestra").innerHTML = rpt[dat].MUESTRA;
                    document.getElementById("estadoorden").innerHTML = rpt[dat].ESTADOORDEN;
                    document.getElementById("documento").innerHTML = rpt[dat].DOCUMENTO;
                    document.getElementById("paciente").innerHTML = rpt[dat].NOM_PACIENTE;
                    document.getElementById("hoja_serv").innerHTML = rpt[dat].SOSORDSER;
                    document.getElementById("orden_serv").innerHTML = rpt[dat].ORDEN_SERVICIO;
                    document.getElementById("sinIndi").innerHTML = rpt[dat].sin_indicaciones;
                    document.getElementById("solCita").innerHTML = rpt[dat].solicitud_cita;
                    document.getElementById("translado").innerHTML = rpt[dat].translado;
                    document.getElementById("tomado").innerHTML = rpt[dat].tomado;
                    document.getElementById("tomadoN").innerHTML = rpt[dat].notoma;
                    document.getElementById("interpretado").innerHTML = rpt[dat].interpretado;
                    document.getElementById("asignar_cita").innerHTML = rpt[dat].asignar_cita;
                    document.getElementById("facturado").innerHTML = rpt[dat].facturado;
                   // document.getElementById("solAuto").innerHTML = rpt[dat].soli_autori;
                    document.getElementById("Auto").innerHTML = rpt[dat].autorizar;
                    document.getElementById("Auton").innerHTML = rpt[dat].noauto;
                    document.getElementById("eps").innerHTML = rpt[dat].GDENOMBRE;
                    if(rpt[dat].HCRFECCONF == ''){
                        var FechaLectura = 'SIN FECHA DE LECTURA';
                    }else{
                        var FechaLectura = rpt[dat].HCRFECCONF;
                    }
                    document.getElementById("FechaLectura").innerHTML = FechaLectura;
                    document.getElementById("RepetirExamen").innerHTML =rpt[dat].Repetir;
                    document.getElementById("InformoPaciente").innerHTML = rpt[dat].Informo;
                    document.getElementById("ExamenCritico").innerHTML = rpt[dat].ExamenCritico;
                }
            }
        </script>
        <body onload="datosla();">
        <div id="apDiv4">
            <table width="81%" height="681" id="tabla">
                    <tr>
                        <td>
                            <table height="77%" id="tabla2" >
                                <tr id="titulo1">
                                    <td colspan="32">
                                        <b>SEGUIMIENTO IMAGENES</b>
                                    </td>
                                </tr>
                                <tr>
                                      <td id="titulo" colspan="3">
                                          <b>INGRESO</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>CAMA</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>CANTIDAD</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>MEDICO</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>INDICACIONES</b>
                                      </td>
                                       <td id="titulo" colspan="3">
                                           <b>PRIORIDAD</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>HOJA DE SERVICIO</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>ESTADO ORDEN</b>
                                      </td>
                                      
                                      <td id="titulo" colspan="3">
                                          <b>ORDEN DE SERVICIO</b>
                                      </td>
                                      <td id="titulo" colspan="4">
                                          <b>EPS</b>
                                      </td>
                                </tr>
                                      <tr>
                                      <td id="filas" colspan="3">
                                        <div id="ingreso"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="cama"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="cantidad"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="medico"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="observaciones"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="estado"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="hoja_serv"></div>
                                      </td>
                                     
                                     <td id="filas" colspan="3">
                                        <div id="estadoorden"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="orden_serv"></div>
                                      </td>
                                      <td id="filas" colspan="4">
                                          <div id="eps"></div>
                                      </td>
                                   <tr>
                                      <td id="titulo" colspan="3">
                                          <b>FECHA SOLICITUD</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>CODIGO</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>EXAMEN</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>FOLIO</b>
                                      </td>
                                       <td id="titulo" colspan="3">
                                           <b>CLASE DE INGRESO</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>INGRESO POR</b>
                                      </td>
                                       <td id="titulo" colspan="3">
                                           <b>DOCUMENTO</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>PACIENTE</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>FECHA DE NACIMIENTO</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>EDAD</b>
                                      </td>
                                      <td id="titulo" colspan="3">
                                          <b>FECHA DE LECTURA</b>
                                      </td>
                                 </tr>
                                 <tr>
                                     <td id="filas" colspan="3">
                                        <div id="fecha_soli"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="codigo"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="muestra"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="folio"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="clase_ingreso"></div>
                                      </td>
                                     <td id="filas" colspan="3">
                                        <div id="ingreso_por"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="documento"></div>
                                      </td>
                                     
                                      <td id="filas" colspan="3">
                                        <div id="paciente"></div>
                                      </td>
                                      <td id="filas" colspan="3">
                                        <div id="fecha_nac"></div>
                                     </td>
                                     <td id="filas" colspan="3">
                                         <div id="edad"></div>
                                     </td>
                                     <td id="filas">
                                         <div id="FechaLectura"></div>
                                     </td>
                                 </tr>
                                 <tr>
                                     <td colspan="32">
                                         <table width="100%" id="tabla2">
                                             <tr id="titulo1">
                                                <td  colspan="5">
                                                      <b>ENCARGADO</b>
                                                </td>
                                             </tr>
                                             <tr>
                                                 <td id="titulo">
                                                     <b>AUTORIZACION</b>
                                                 </td>
                                                 <td id="titulo">
                                                     <b>NO AUTORIZACION</b>
                                                 </td>
                                                 <td id="titulo">
                                                     <b>CITA SOLICITADA</b>
                                                 </td>
                                                  <td id="titulo">
                                                     <b>CITA ASIGNADA</b>
                                                 </td>
                                                 <td id="titulo">
                                                     <b>TRASLADO</b>
                                                 </td>
                                             </tr>
                                             <tr>
                                                 <td id="filas">
                                                     <div id="Auto"></div>
                                                 </td>
                                                 <td id="filas">
                                                     <div id="Auton"></div>
                                                 </td>
                                                 <td id="filas">
                                                     <div id="solCita"></div>
                                                 </td>
                                                 <td id="filas">
                                                     <div id="asignar_cita"></div>
                                                 </td>
                                                 <td id="filas">
                                                     <div id="translado"></div>
                                                 </td>
                                             </tr>
                                             <tr>
                                                 <td id="titulo">
                                                     <b>SIN INDICACIONES</b>
                                                 </td>
                                                 <td id="titulo">
                                                     <b>FACTURADO</b>
                                                 </td>
                                                 <td id="titulo" >
                                                     <b>TOMADO</b>
                                                 </td>
                                                 <td id="titulo" >
                                                     <b>NO TOMADO</b>
                                                 </td>
                                                 <td id="titulo">
                                                     <b>INTERPRETADO</b>
                                                 </td>
                                             </tr>
                                             <tr>
                                                 <td id="filas">
                                                     <div id="sinIndi"></div>
                                                 </td>
                                                 <td id="filas" >
                                                     <div id="facturado"></div>
                                                 </td>
                                                 <td id="filas" >
                                                     <div id="tomado"></div>
                                                 </td>
                                                  <td id="filas" >
                                                     <div id="tomadoN"></div>
                                                 </td>
                                                 <td id="filas">
                                                     <div id="interpretado"></div>
                                                 </td>
                                             </tr>
                                             <tr>
                                                 <td id="titulo">
                                                     <b>REPETIR EXAMEN</b>
                                                 </td>
                                                 <td id="titulo" colspan="2">
                                                     <b>SE LE INFORMO AL PACIENTE</b>
                                                 </td>
                                                 <td id="titulo" colspan="2">
                                                     <b>EXAMEN CRITICO</b>
                                                 </td>
                                             </tr>
                                             <tr>
                                                 <td id="filas">
                                                     <div id="RepetirExamen"></div>
                                                 </td>
                                                 <td id="filas" colspan="2">
                                                     <div id="InformoPaciente"></div>
                                                 </td>
                                                 
                                                 <td id="filas" colspan="2">
                                                     <div id="ExamenCritico"></div>
                                                 </td>
                                             </tr>
                                         </table>
                                     </td>
                                 </tr>
                     </table> 
                 <input type="hidden" id="OID" name="txtOID" value="<?php echo$_REQUEST['OID'] ?>" />
                 <input type="hidden" id="N" name="txtOID" value="<?php echo$_REQUEST['N'] ?>" />
            </table> 
        </div>
        <center>
    </body>
</html>